From: Keir Fraser Date: Thu, 3 Sep 2009 08:50:46 +0000 (+0100) Subject: x86 vpt: Small performance fixes. X-Git-Tag: archive/raspbian/4.8.0-1+rpi1~1^2~13386 X-Git-Url: https://dgit.raspbian.org/%22http://www.example.com/cgi/success//%22http:/www.example.com/cgi/success/?a=commitdiff_plain;h=a980249c45caa086a5e08fe8a827a865c5ea9491;p=xen.git x86 vpt: Small performance fixes. 1. once one-shot timer is fired, IRQ is raised repeatedly forever. 2. Test pending_intr_nr before pt_irq_masked(), as it is cheaper. Signed-off-by: Kouya Shimura --- diff --git a/xen/arch/x86/hvm/vpt.c b/xen/arch/x86/hvm/vpt.c index 0cb180ceba..7721873f2c 100644 --- a/xen/arch/x86/hvm/vpt.c +++ b/xen/arch/x86/hvm/vpt.c @@ -229,7 +229,7 @@ void pt_update_irq(struct vcpu *v) list_for_each_entry ( pt, head, list ) { - if ( !pt_irq_masked(pt) && pt->pending_intr_nr && + if ( pt->pending_intr_nr && !pt_irq_masked(pt) && ((pt->last_plt_gtime + pt->period) < max_lag) ) { max_lag = pt->last_plt_gtime + pt->period; @@ -298,6 +298,7 @@ void pt_intr_post(struct vcpu *v, struct hvm_intack intack) if ( pt->on_list ) list_del(&pt->list); pt->on_list = 0; + pt->pending_intr_nr = 0; } else {